package cn.song.domain;

import cn.song.enums.OrderStatusEnum;
import cn.song.enums.PayStatusEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单列表
 */
@Entity
@Data
@DynamicUpdate
public class OrderMaster {

    // 订单ID
    @Id
    private  String  orderId;

    // 买家姓名
    private String buyerName;

    private String buyerPhone;

    private String buyerAddress;

    private String buyerOpenid;

    //订单金额
    private BigDecimal orderAmount;

    //订单状态
    private Integer orderStatus= OrderStatusEnum.NEW.getCode();

    // 支付状态
    private Integer payStatus = PayStatusEnum.WAIT.getCode();

    private Date createTime;

    private Date updateTime;


}
